package cn.biplam.front.component.view.systemManage.task.modelimport;

import cn.biplam.common.struc.MdStruc;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.Result;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.callback.CallBack;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.base.Text;

/**
 * 模型对象导入，处理字段绑定器
 * @author XiaoRuxing 2009-6-22下午03:59:24
 * @version 1.0
 */
public class ModelImportTaskStautsCallBack implements CallBack{

	public HtmlWindow[] getGroup(Result data, String homeUrl, UserInfo mUser)
	throws ErrorMessage {
		HtmlWindow[] opetator=new HtmlWindow[1];

		/** 任务状态 */
		String status = data.getString(MdStruc.MdImpTaskStruc.STATUS);

		if("0".equals(status)){
			status = "导入中";
		}else if("1".equals(status)){
			status = "缓冲区";
		}else if("2".equals(status)){
			status = "异常结束";
		}else if("3".equals(status)){
			status = "完成";
		}

		opetator[0]= new Text(status).get(); 
		return opetator;
	}

}
